import {createStore, applyMiddleware, combineReducers} from 'redux';
import thunk from 'redux-thunk';
import {reducer as counter} from './component/Counter';
import {reducer as weather} from './component/Weather';
import {reducer as filter} from './route/App/Demo/Todo/Filter';
import {reducer as todos} from './route/App/Demo/Todo/Todos';

const initialState = {
	counter: {
		'first': 0,
		'second': 10,
		'third': 20
	},
	weather: {
		status: 'LOADING',
		city: null,
		weather: null,
		temp1: null,
		temp2: null
	},
	filter: 'all',
    todos: []
};

const rootReducer = combineReducers({
	counter,
	weather,
	filter,
    todos
});

const store = createStore(
	rootReducer,
	initialState,
	applyMiddleware(thunk)
);

export default store;
			